package cn.swenty.backstage.framework.common.model;

import java.util.List;
import java.util.Map;

import cn.swenty.backstage.framework.common.tree.TreeNode;

public class Function implements TreeNode,Comparable<Function>{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String function_id;
	
	private int function_type;
	
	private String function_code;
	
	private String function_name;
	
	private String app_id;
	
	private String parent_id;
	
	private int level;
	
	private String url;
	
	private String icon;
	
	private String state;
	
	private int squence = 0;
	
	private String description;
	
	private List<TreeNode> children;
	
	
	private TreeNode parent;


	public String getFunction_id() {
		return function_id;
	}


	public void setFunction_id(String function_id) {
		this.function_id = function_id;
	}


	public int getFunction_type() {
		return function_type;
	}


	public void setFunction_type(int function_type) {
		this.function_type = function_type;
	}


	public String getFunction_code() {
		return function_code;
	}


	public void setFunction_code(String function_code) {
		this.function_code = function_code;
	}


	public String getFunction_name() {
		return function_name;
	}


	public void setFunction_name(String function_name) {
		this.function_name = function_name;
	}


	public String getApp_id() {
		return app_id;
	}


	public void setApp_id(String app_id) {
		this.app_id = app_id;
	}


	public String getParent_id() {
		return parent_id;
	}


	public void setParent_id(String parent_id) {
		this.parent_id = parent_id;
	}


	public int getLevel() {
		return level;
	}


	public void setLevel(int level) {
		this.level = level;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public String getIcon() {
		return icon;
	}


	public void setIcon(String icon) {
		this.icon = icon;
	}


	public String getState() {
		return state;
	}


	public void setState(String state) {
		this.state = state;
	}


	public int getSquence() {
		return squence;
	}


	public void setSquence(int squence) {
		this.squence = squence;
	}


	public String getDescription() {
		return description;
	}


	public void setDescription(String description) {
		this.description = description;
	}


	public List<TreeNode> getChildren() {
		return children;
	}


	public void setChildren(List children) {
		this.children = children;
	}


	public TreeNode getParent() {
		return parent;
	}


	public void setParent(TreeNode parent) {
		this.parent = parent;
	}


	public String getId() {
		return function_id;
	}


	public void setId(String id) {
		this.function_id = id;
	}


	public String getParentId() {
		return parent_id;
	}


	public void setParentId(String parentId) {
		this.parent_id = parentId;
	}


	public Integer getDisplayNo() {
		return squence;
	}


	public void setDisplayNo(Integer displayNo) {
		
		this.squence = displayNo;
		
	}

	public Map<String, Object> filter() {
		return null;
	}


	public String getName() {
		return function_name;
	}


	public String getParentName() {
		return parent.getName();
	}

	public int compareTo(Function arg0) {
		return this.squence-arg0.squence;
	}


}
